package com.mjf.scala.chapter04

/**
 * while循环
 */
object Scala03_While {

  def main(args: Array[String]): Unit = {

    var a = 5

    // while
/*
    while (a >= 1) {
      println(a)
      a -= 1
    }
*/

    // do while 至少执行一次
    do {
      println(a)
      a -= 1
    } while (a >= 1)

  }

}
